package com.bean;

import java.io.Serializable;

/**
 * 超市库存实体类
 */
public class Market implements Serializable {
    /*主键*/
    private Integer id;
    /*商品外键*/
    private Integer commodityId;
    /*超市库存数量*/
    private Integer amount;
    /*超市零售价*/
    private Double price;
    /*超市折扣价*/
    private Double discountPrice;
    /*超市会员价*/
    private Double vipPrice;
    /*商品状态*/
    private Integer state;
    /*商品信息（名称、类别）*/
    private Commodity commodity;



    public Market() {
    }

    public Market(Integer id, Integer amount) {
        this.id = id;
        this.amount = amount;
    }

    public Market(Integer commodityId) {
        this.commodityId = commodityId;
    }

    public Market(Integer commodityId, Integer amount, Double price, Double discountPrice, Double vipPrice, Integer state) {
        this.commodityId = commodityId;
        this.amount = amount;
        this.price = price;
        this.discountPrice = discountPrice;
        this.vipPrice = vipPrice;
        this.state = state;
    }

    public Market(Integer id, Integer commodityId, Integer amount, Double price, Double discountPrice, Double vipPrice, Integer state) {
        this.id = id;
        this.commodityId = commodityId;
        this.amount = amount;
        this.price = price;
        this.discountPrice = discountPrice;
        this.vipPrice = vipPrice;
        this.state = state;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getCommodityId() {
        return commodityId;
    }

    public void setCommodityId(Integer commodityId) {
        this.commodityId = commodityId;
    }

    public Integer getAmount() {
        return amount;
    }

    public void setAmount(Integer amount) {
        this.amount = amount;
    }

    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }

    public Double getDiscountPrice() {
        return discountPrice;
    }

    public void setDiscountPrice(Double discountPrice) {
        this.discountPrice = discountPrice;
    }

    public Double getVipPrice() {
        return vipPrice;
    }

    public void setVipPrice(Double vipPrice) {
        this.vipPrice = vipPrice;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public Commodity getCommodity() {
        return commodity;
    }

    public void setCommodity(Commodity commodity) {
        this.commodity = commodity;
    }
    @Override
    public String toString() {
        return "Market{" +
                "id=" + id +
                ", commodityId=" + commodityId +
                ", amount=" + amount +
                ", price=" + price +
                ", discountPrice=" + discountPrice +
                ", vipPrice=" + vipPrice +
                ", state=" + state +
                '}';
    }
}
